The transmission rate, delivery reliability and network lifetime are three fundamental but conflicting design objectives in energy-constrained wireless sensor networks. In this paper, we address the optimal rate-reliability-lifetime tradeoff with link capacity constraint, reliability constraint and energy constraint. By introducing the weight parameters, we combine the objectives at rate, reliability, and lifetime into a single objective to characterize the tradeoff among them. However, the optimization formulation of the rate-reliability-reliability tradeoff is neither separable nor convex. Through a series of transformations, a separable and convex problem is derived, and an efficient distributed Subgradient Dual Decomposition algorithm (SDD) is proposed. Numerical examples confirm its convergence. Also, numerical examples investigate the impact of weight parameters on the rate utility, reliability utility and network lifetime, which provide a guidance to properly set the value of weight parameters for a desired performance of WSNs according to the realistic application's requirements.